<?php

namespace App\Admin\Validate\Base;


use App\Common\Validate\AbstractValidate;

class RouteValidate extends AbstractValidate
{
    protected function allRules(): array
    {
        return [
            'id'   => ['require', 'integer'],
            'type|类型' => ['require'],
        ];
    }

    /**
     * @return RouteValidate
     */
    public function sceneUpdate(): RouteValidate
    {
        return $this->only(['id', 'type']);
    }

    public function sceneStore(): RouteValidate
    {
        return $this->only(['type']);
    }

    public function sceneDestroy(): RouteValidate
    {
        return $this->rule(['ids|要删除的数据' => 'require|array'])->only(['ids']);
    }

    protected function allMessages(): array
    {
        return [];
    }
}
